#define _CRT_SECURE_NO_WARNINGS 1

#include<iostream>
#include "heap.h"

using namespace std;

void TestHeap1()
{
	zhang::heap<int> hp;

	cout << "is empty: " << hp.empty() << endl;
	cout << "HeapSize = " << hp.size() << endl;
	cout << endl;

	hp.push(23);
	hp.push(45);
	hp.push(12);
	hp.push(76);
	hp.push(22);
	hp.push(98);
	hp.push(23);
	hp.push(56);

	cout << "is empty: " << hp.empty() << endl;
	cout << "top num = " << hp.top() << endl;
	cout << "HeapSize = " << hp.size() << endl;
	cout << endl;

	hp.pop();
	cout << "top num = " << hp.top() << endl;
	cout << "HeapSize = " << hp.size() << endl;
	cout << endl;

	hp.pop();
	cout << "top num = " << hp.top() << endl;
	cout << "HeapSize = " << hp.size() << endl;
	cout << endl;
}

void TestTopK()
{
	int arr[] = { 20,45,23,19,5,3,57,29,12 };
	size_t sz = sizeof(arr) / sizeof(arr[0]);  //
	zhang::PrintTopK(arr, sz, 4);
}

//int main()
//{
//	//TestHeap1();
//	TestTopK();
//	
//	return 0;
//}